<%inherit file="../forum_base.html"/>

<%block name="submain">

<div id="forum-tag-view">
  <div class="row-fluid">
    <div class="span9">

      % if TOPIC_LIST:
      <div id="forum-topic-list">
        % for T in TOPIC_LIST:
        <% LINK = reverse_url('forum:topic:view') + '?id=%s' % T.id %>
        <div class="row-fluid topic">

          <div class="span2 text-center status">
            <div class="well">
              <div class="vote-count">${ T.like + T.unlike }<br>${ _("Votes") }</div>
              <div class="post-count">${ len(T.posts) }<br>${ _("Posts") }</div>
            </div>
            <div class="view-count">${ T.visit } ${ _("Views") }</div>
          </div>

          <div class="span10 summary">
            <h3><a href="${ LINK }">${ T.name }</a></h3>
            <div>${ T.summary }</div>

            <div class="row-fluid">
              <div class="span9 tags">
                %for tag in T.tags:
                <a class="tag" href="${ reverse_url('forum:tag:view') }?id=${ tag.id }">${ tag.name }</a>
                %endfor
              </div>
              <div class="span3 started">
                <div class="time" title="${ ftime(T.created) }">${ htime(T.created) }</div>
                <div><i class="icon-user"></i> <a class="user" href="${ reverse_url('user:view') }?id=${ T.user_id }">${ T.user.username }</a></div>
              </div>
            </div>
          </div>
        </div>
        % endfor
        ${ page_html }
      </div>

      % else:
      <div class="hero-unit">${ _("No topics yet.") }</div>
      % endif

    </div>

    <div class="span3">
      <p class="tags"><a class="tag" href="${ reverse_url('forum:tag:view') }?id=${ TAG.id }">${ TAG.name }</a> x ${ TOPIC_TOTAL }</p>

      <p><a href="${ reverse_url('forum:tag:home') }">${ _("View All Tags") }</a></p>
    </div>

  </div>
</div>

</%block>
